home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 July: Mac OS SDK / Dev.CD Jul 97 SDK1.toast / Development Kits (Disc 1) / Interfaces&Libraries / Interfaces / AIncludes / ImageCodec.a < prev    next >
Encoding:
Text File  |  1996-01-24  |  9.3 KB  |  312 lines  |  [TEXT/MPS ]

  1. ;
  2. ;    File:        ImageCodec.a
  3. ;
  4. ;    Contains:    QuickTime Interfaces.
  5. ;
  6. ;    Version:    Technology:    QuickTime 2.0
  7. ;                Package:    Universal Interfaces 2.2 in “MPW” on ETO #20
  8. ;
  9. ;    Copyright:    © 1984-1995 by Apple Computer, Inc.
  10. ;                All rights reserved.
  11. ;
  12. ;    Bugs?:        If you find a problem with this file, use the Apple Bug Reporter
  13. ;                stack.  Include the file and version information (from above)
  14. ;                in the problem description and send to:
  15. ;                    Internet:    apple.bugs@applelink.apple.com
  16. ;                    AppleLink:    APPLE.BUGS
  17. ;
  18. ;
  19.  
  20.     IF &TYPE('__IMAGECODEC__') = 'UNDEFINED' THEN
  21. __IMAGECODEC__ SET 1
  22.  
  23.  
  24.     IF &TYPE('__TYPES__') = 'UNDEFINED' THEN
  25.     include 'Types.a'
  26.     ENDIF
  27. ;        include 'ConditionalMacros.a'                                ;
  28.  
  29.     IF &TYPE('__QUICKDRAW__') = 'UNDEFINED' THEN
  30.     include 'Quickdraw.a'
  31.     ENDIF
  32. ;        include 'MixedMode.a'                                        ;
  33. ;        include 'QuickdrawText.a'                                    ;
  34.  
  35.     IF &TYPE('__QDOFFSCREEN__') = 'UNDEFINED' THEN
  36.     include 'QDOffscreen.a'
  37.     ENDIF
  38. ;        include 'Errors.a'                                            ;
  39.  
  40.     IF &TYPE('__WINDOWS__') = 'UNDEFINED' THEN
  41.     include 'Windows.a'
  42.     ENDIF
  43. ;        include 'Memory.a'                                            ;
  44. ;        include 'Events.a'                                            ;
  45. ;            include 'OSUtils.a'                                    ;
  46. ;        include 'Controls.a'                                        ;
  47. ;            include 'Menus.a'                                        ;
  48.  
  49.     IF &TYPE('__IMAGECOMPRESSION__') = 'UNDEFINED' THEN
  50.     include 'ImageCompression.a'
  51.     ENDIF
  52. ;        include 'Components.a'                                        ;
  53. ;        include 'StandardFile.a'                                    ;
  54. ;            include 'Dialogs.a'                                    ;
  55. ;                include 'TextEdit.a'                                ;
  56. ;            include 'Files.a'                                        ;
  57. ;                include 'Finder.a'                                    ;
  58.  
  59.     IF &TYPE('__COMPONENTS__') = 'UNDEFINED' THEN
  60.     include 'Components.a'
  61.     ENDIF
  62.  
  63.     IF &TYPE('__MOVIES__') = 'UNDEFINED' THEN
  64.     include 'Movies.a'
  65.     ENDIF
  66. ;        include 'Aliases.a'                                        ;
  67. ;            include 'AppleTalk.a'                                    ;
  68.  
  69. codecGetCodecInfo                EQU        $00
  70. codecGetCompressionTime            EQU        $01
  71. codecGetMaxCompressionSize        EQU        $02
  72. codecPreCompress                EQU        $03
  73. codecBandCompress                EQU        $04
  74. codecPreDecompress                EQU        $05
  75. codecBandDecompress                EQU        $06
  76. codecCDSequenceBusy                EQU        $07
  77. codecGetCompressedImageSize        EQU        $08
  78. codecGetSimilarity                EQU        $09
  79. codecTrimImage                    EQU        $0A
  80. codecRequestSettings            EQU        $0B
  81. codecGetSettings                EQU        $0C
  82. codecSetSettings                EQU        $0D
  83. codecCDSequenceFlush            EQU        $0E
  84. codecSetTimeCode                EQU        $0F
  85.  
  86. codecCanScale                    EQU        1 << 0
  87. codecCanMask                    EQU        1 << 1
  88. codecCanMatte                    EQU        1 << 2
  89. codecCanTransform                EQU        1 << 3
  90. codecCanTransferMode            EQU        1 << 4
  91. codecCanCopyPrev                EQU        1 << 5
  92. codecCanSpool                    EQU        1 << 6
  93. codecCanClipVertical            EQU        1 << 7
  94. codecCanClipRectangular            EQU        1 << 8
  95. codecCanRemapColor                EQU        1 << 9
  96. codecCanFastDither                EQU        1 << 10
  97. codecCanSrcExtract                EQU        1 << 11
  98. codecCanCopyPrevComp            EQU        1 << 12
  99. codecCanAsync                    EQU        1 << 13
  100. codecCanMakeMask                EQU        1 << 14
  101. codecCanShift                    EQU        1 << 15
  102. codecCanAsyncWhen                EQU        1 << 16
  103. codecCanShieldCursor            EQU        1 << 17
  104. codecCanManagePrevBuffer        EQU        1 << 18
  105.  
  106. CodecCapabilities         RECORD    0
  107. flags                     ds.l   1        ; offset: $0 (0)
  108. wantedPixelSize             ds.w   1        ; offset: $4 (4)
  109. extendWidth                 ds.w   1        ; offset: $6 (6)
  110. extendHeight             ds.w   1        ; offset: $8 (8)
  111. bandMin                     ds.w   1        ; offset: $A (10)
  112. bandInc                     ds.w   1        ; offset: $C (12)
  113. pad                         ds.w   1        ; offset: $E (14)
  114. time                     ds.l   1        ; offset: $10 (16)
  115. sizeof                     EQU *            ; size:   $14 (20)
  116.                         ENDR
  117.  
  118. ; typedef struct CodecCapabilities  CodecCapabilities
  119.  
  120. codecConditionFirstBand            EQU        1 << 0
  121. codecConditionLastBand            EQU        1 << 1
  122. codecConditionFirstFrame        EQU        1 << 2
  123. codecConditionNewDepth            EQU        1 << 3
  124. codecConditionNewTransform        EQU        1 << 4
  125. codecConditionNewSrcRect        EQU        1 << 5
  126. codecConditionNewMask            EQU        1 << 6
  127. codecConditionNewMatte            EQU        1 << 7
  128. codecConditionNewTransferMode    EQU        1 << 8
  129. codecConditionNewClut            EQU        1 << 9
  130. codecConditionNewAccuracy        EQU        1 << 10
  131. codecConditionNewDestination    EQU        1 << 11
  132. codecConditionFirstScreen        EQU        1 << 12
  133. codecConditionDoCursor            EQU        1 << 13
  134. codecConditionCatchUpDiff        EQU        1 << 14
  135. codecConditionCodecChangedMask    EQU        1 << 31
  136.  
  137. codecInfoResourceType            EQU        'cdci'
  138. codecInterfaceVersion            EQU        2
  139.  
  140. CodecCompressParams     RECORD    0
  141. sequenceID                 ds.l   1        ; offset: $0 (0)
  142. imageDescription         ds.l   1        ; offset: $4 (4)
  143. data                     ds.l   1        ; offset: $8 (8)
  144. bufferSize                 ds.l   1        ; offset: $C (12)
  145. frameNumber                 ds.l   1        ; offset: $10 (16)
  146. startLine                 ds.l   1        ; offset: $14 (20)
  147. stopLine                 ds.l   1        ; offset: $18 (24)
  148. conditionFlags             ds.l   1        ; offset: $1C (28)
  149. callerFlags                 ds.w   1        ; offset: $20 (32)
  150. capabilities             ds.l   1        ; offset: $22 (34)
  151. progressProcRecord         ds     ICMProgressProcRecord ; offset: $26 (38)
  152. completionProcRecord     ds     ICMCompletionProcRecord ; offset: $2E (46)
  153. flushProcRecord             ds     ICMFlushProcRecord ; offset: $36 (54)
  154. srcPixMap                 ds     PixMap    ; offset: $3E (62)
  155. prevPixMap                 ds     PixMap    ; offset: $70 (112)
  156. spatialQuality             ds.l   1        ; offset: $A2 (162)
  157. temporalQuality             ds.l   1        ; offset: $A6 (166)
  158. similarity                 ds.l   1        ; offset: $AA (170)
  159. dataRateParams             ds.l   1        ; offset: $AE (174)
  160. reserved                 ds.l   1        ; offset: $B2 (178)
  161. sizeof                     EQU *            ; size:   $B6 (182)
  162.                         ENDR
  163.  
  164. ; typedef struct CodecCompressParams  CodecCompressParams
  165. CodecDecompressParams     RECORD    0
  166. sequenceID                 ds.l   1        ; offset: $0 (0)
  167. imageDescription         ds.l   1        ; offset: $4 (4)
  168. data                     ds.l   1        ; offset: $8 (8)
  169. bufferSize                 ds.l   1        ; offset: $C (12)
  170. frameNumber                 ds.l   1        ; offset: $10 (16)
  171. startLine                 ds.l   1        ; offset: $14 (20)
  172. stopLine                 ds.l   1        ; offset: $18 (24)
  173. conditionFlags             ds.l   1        ; offset: $1C (28)
  174. callerFlags                 ds.w   1        ; offset: $20 (32)
  175. capabilities             ds.l   1        ; offset: $22 (34)
  176. progressProcRecord         ds     ICMProgressProcRecord ; offset: $26 (38)
  177. completionProcRecord     ds     ICMCompletionProcRecord ; offset: $2E (46)
  178. dataProcRecord             ds     ICMDataProcRecord ; offset: $36 (54)
  179. port                     ds.l   1        ; offset: $3E (62)
  180. dstPixMap                 ds     PixMap    ; offset: $42 (66)
  181. maskBits                 ds.l   1        ; offset: $74 (116)
  182. mattePixMap                 ds.l   1        ; offset: $78 (120)
  183. srcRect                     ds     Rect    ; offset: $7C (124)
  184. matrix                     ds.l   1        ; offset: $84 (132)
  185. accuracy                 ds.l   1        ; offset: $88 (136)
  186. transferMode             ds.w   1        ; offset: $8C (140)
  187. frameTime                 ds.l   1        ; offset: $8E (142)
  188. reserved                 ds.l   1        ; offset: $92 (146)
  189. matrixFlags                 ds.b   1        ; offset: $96 (150)
  190. matrixType                 ds.b   1        ; offset: $97 (151)
  191. dstRect                     ds     Rect    ; offset: $98 (152)
  192. sizeof                     EQU *            ; size:   $A0 (160)
  193.                         ENDR
  194.  
  195. ; typedef struct CodecDecompressParams  CodecDecompressParams
  196.  
  197. matrixFlagScale2x                EQU        1 << 7
  198.  
  199. ;
  200. ; pascal ComponentResult CDGetCodecInfo(Handle storage, CodecInfo *info)
  201. ;
  202.     IF GENERATINGCFM THEN
  203.         IMPORT_CFM_FUNCTION    CDGetCodecInfo
  204.     ENDIF
  205.  
  206. ;
  207. ; pascal ComponentResult CDGetCompressionTime(Handle storage, PixMapHandle src, const Rect *srcRect, short depth, CodecQ *spatialQuality, CodecQ *temporalQuality, unsigned long *time)
  208. ;
  209.     IF GENERATINGCFM THEN
  210.         IMPORT_CFM_FUNCTION    CDGetCompressionTime
  211.     ENDIF
  212.  
  213. ;
  214. ; pascal ComponentResult CDGetMaxCompressionSize(Handle storage, PixMapHandle src, const Rect *srcRect, short depth, CodecQ quality, long *size)
  215. ;
  216.     IF GENERATINGCFM THEN
  217.         IMPORT_CFM_FUNCTION    CDGetMaxCompressionSize
  218.     ENDIF
  219.  
  220. ;
  221. ; pascal ComponentResult CDPreCompress(Handle storage, CodecCompressParams *params)
  222. ;
  223.     IF GENERATINGCFM THEN
  224.         IMPORT_CFM_FUNCTION    CDPreCompress
  225.     ENDIF
  226.  
  227. ;
  228. ; pascal ComponentResult CDBandCompress(Handle storage, CodecCompressParams *params)
  229. ;
  230.     IF GENERATINGCFM THEN
  231.         IMPORT_CFM_FUNCTION    CDBandCompress
  232.     ENDIF
  233.  
  234. ;
  235. ; pascal ComponentResult CDPreDecompress(Handle storage, CodecDecompressParams *params)
  236. ;
  237.     IF GENERATINGCFM THEN
  238.         IMPORT_CFM_FUNCTION    CDPreDecompress
  239.     ENDIF
  240.  
  241. ;
  242. ; pascal ComponentResult CDBandDecompress(Handle storage, CodecDecompressParams *params)
  243. ;
  244.     IF GENERATINGCFM THEN
  245.         IMPORT_CFM_FUNCTION    CDBandDecompress
  246.     ENDIF
  247.  
  248. ;
  249. ; pascal ComponentResult CDCodecBusy(Handle storage, ImageSequence seq)
  250. ;
  251.     IF GENERATINGCFM THEN
  252.         IMPORT_CFM_FUNCTION    CDCodecBusy
  253.     ENDIF
  254.  
  255. ;
  256. ; pascal ComponentResult CDGetCompressedImageSize(Handle storage, ImageDescriptionHandle desc, Ptr data, long bufferSize, ICMDataProcRecordPtr dataProc, long *dataSize)
  257. ;
  258.     IF GENERATINGCFM THEN
  259.         IMPORT_CFM_FUNCTION    CDGetCompressedImageSize
  260.     ENDIF
  261.  
  262. ;
  263. ; pascal ComponentResult CDGetSimilarity(Handle storage, PixMapHandle src, const Rect *srcRect, ImageDescriptionHandle desc, Ptr data, Fixed *similarity)
  264. ;
  265.     IF GENERATINGCFM THEN
  266.         IMPORT_CFM_FUNCTION    CDGetSimilarity
  267.     ENDIF
  268.  
  269. ;
  270. ; pascal ComponentResult CDTrimImage(Handle storage, ImageDescriptionHandle Desc, Ptr inData, long inBufferSize, ICMDataProcRecordPtr dataProc, Ptr outData, long outBufferSize, ICMFlushProcRecordPtr flushProc, Rect *trimRect, ICMProgressProcRecordPtr progressProc)
  271. ;
  272.     IF GENERATINGCFM THEN
  273.         IMPORT_CFM_FUNCTION    CDTrimImage
  274.     ENDIF
  275.  
  276. ;
  277. ; pascal ComponentResult CDRequestSettings(Handle storage, Handle settings, Rect *rp, ModalFilterUPP filterProc)
  278. ;
  279.     IF GENERATINGCFM THEN
  280.         IMPORT_CFM_FUNCTION    CDRequestSettings
  281.     ENDIF
  282.  
  283. ;
  284. ; pascal ComponentResult CDGetSettings(Handle storage, Handle settings)
  285. ;
  286.     IF GENERATINGCFM THEN
  287.         IMPORT_CFM_FUNCTION    CDGetSettings
  288.     ENDIF
  289.  
  290. ;
  291. ; pascal ComponentResult CDSetSettings(Handle storage, Handle settings)
  292. ;
  293.     IF GENERATINGCFM THEN
  294.         IMPORT_CFM_FUNCTION    CDSetSettings
  295.     ENDIF
  296.  
  297. ;
  298. ; pascal ComponentResult CDCodecFlush(Handle storage)
  299. ;
  300.     IF GENERATINGCFM THEN
  301.         IMPORT_CFM_FUNCTION    CDCodecFlush
  302.     ENDIF
  303.  
  304. ;
  305. ; pascal ComponentResult CDCodecSetTimeCode(Handle storage, void *timeCodeFormat, void *timeCodeTime)
  306. ;
  307.     IF GENERATINGCFM THEN
  308.         IMPORT_CFM_FUNCTION    CDCodecSetTimeCode
  309.     ENDIF
  310.  
  311.     ENDIF ; __IMAGECODEC__
  312.